package com.wln.sms.sms.config;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.wln.common.utils.R;
import com.wln.sms.sms.vo.ActivityGoodsVo;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@Component
public final class ExceptionConfig {

    public static R handleException(@RequestBody ActivityGoodsVo activityGoodsVo, BlockException ex) {
        System.err.println("错误发生: " + ex.getClass().getCanonicalName());
        return R.error("发生降级了");
    }

}
